package com.sxhalo.fsms.service.impl;

import com.sxhalo.fsms.domain.DeviceSmartRunningData;
import com.sxhalo.fsms.domain.MotorRunningData;
import com.sxhalo.fsms.domain.RedisData;
import com.sxhalo.fsms.mapper.DeviceSmartRunningDataMapper;
import com.sxhalo.fsms.service.IDeviceSmartRunningDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DeviceSmartRunningDataServiceImpl implements IDeviceSmartRunningDataService {

	@Autowired
	private DeviceSmartRunningDataMapper mapper;

	@Override
	public Integer insertSelective(DeviceSmartRunningData record) {
		return null;
	}

	@Override
	public Integer updateByPrimaryKeySelective(DeviceSmartRunningData record) {
		return null;
	}

	@Override
	public Integer deleteByPrimaryKey(Object key) {
		return null;
	}

	@Override
	public DeviceSmartRunningData selectByPrimaryKey(Object key) {
		return null;
	}

	@Override
	public List<DeviceSmartRunningData> findWhereList(String where, String order) {
		return null;
	}

	@Override
	public Integer getCount(String where) {
		return null;
	}

	@Override
	public List<DeviceSmartRunningData> findPagerList(Integer start, Integer length, String where, String order) {
		return null;
	}


	@Override
	public List<DeviceSmartRunningData> findPhaseHis(String   where) {
		return mapper.findPhaseHis(where);
	}

	@Override
	public Integer foreachInsert(List<RedisData> list) {
		if(list.size()==0){
			return null;
		}
		return mapper.batchInsert(list);
	}

	@Override
	public List<HashMap> findAttrHis(String attr, String where) {
		return mapper.findAttrHis(attr,where);
	}

	@Override
	public List<Map<String, Object>> energyTrendStatistics(String where, Integer type) {
		return mapper.energyTrendStatistics(where,type);
	}

	@Override
	public Map<String, Object> getEnergyNumStatistics(String where) {
		return mapper.getEnergyNumStatistics(where);
	}

	@Override
	public List<Map<String, Object>> getEnergyPhaseHis(String where) {
		return mapper.getEnergyPhaseHis(where);
	}

	@Override
	public List<Map<String, Object>> getBeforReportCount(String where) {
		return mapper.getBeforReportCount(where);
	}

	@Override
	public List<Map<String, Object>> getEnergyReport(String where, String where1,String where2, String type) {
		return mapper.getEnergyReport(where,where1,where2,type);
	}
}
